package portal.engine;

import java.util.concurrent.LinkedBlockingQueue;

public class JobQueue {

    private static LinkedBlockingQueue queues = null;
    public static LinkedBlockingQueue getTaskQueue(){
        if(queues==null){
            queues =  new LinkedBlockingQueue();
            System.out.println("初始化作业队列");
        }
        return queues;
    }

    public static void add(Object jobId){
        if(queues==null)
            queues =  getTaskQueue();
        queues.offer(jobId);
//        System.out.println("-------------------------------");
//        System.out.println("入队："+jobId);
    }
}
